﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace iTunesFastForward
{
    public partial class AlbumCoverUC : UserControl
    {

        private AlbumCover _cover;
        internal AlbumCover Cover
        {
            get
            {
                return _cover;
            }
            set
            {
                _cover = value;
                ApplyCover();
            }
        }

        public AlbumCoverUC()
        {
            InitializeComponent();
        }

        private void ApplyCover()
        {
            pictureBox1.Image = _cover.ImageMedium;
            this.toolTip.SetToolTip(pictureBox1,
                    string.Format("Artist: {0}\nAlbum: {1}\nRelease Date: {2}\n(Left-click to apply)",
                        Cover.Artist, Cover.Album, Cover.Year));
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            OnClick(e);
        }

    }
}
